package com.ctsi.ssdc.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.ctsi.ssdc.annotation.AutoId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.time.ZonedDateTime;

/**
 * @author ctsi-biyi-generator
*/
@ApiModel(description = "LitemallComment")
@TableName("litemall_comment")
public class LitemallComment extends Model<LitemallComment> implements Serializable {
    /**
     * @Fields id 
     */
    @ApiModelProperty("")
    @AutoId(primaryKey = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value="id")
    @TableField(value="id")
    private Integer id;

    /**
     * @Fields valueId 如果type=0，则是商品评论；如果是type=1，则是专题评论。
     */
    @ApiModelProperty("valueId")
    @TableField(value="value_id")
    private Integer valueId;

    /**
     * @Fields type 评论类型，如果type=0，则是商品评论；如果是type=1，则是专题评论；
     */
    @ApiModelProperty("type")
    @TableField(value="type")
    private Byte type;

    /**
     * @Fields content 评论内容
     */
    @ApiModelProperty("content")
    @TableField(value="content")
    private String content;

    /**
     * @Fields adminContent 管理员回复内容
     */
    @ApiModelProperty("adminContent")
    @TableField(value="admin_content")
    private String adminContent;

    /**
     * @Fields userId 用户表的用户ID
     */
    @ApiModelProperty("userId")
    @TableField(value="user_id")
    private Integer userId;

    /**
     * @Fields hasPicture 是否含有图片
     */
    @ApiModelProperty("hasPicture")
    @TableField(value="has_picture")
    private Boolean hasPicture;

    /**
     * @Fields picUrls 图片地址列表，采用JSON数组格式
     */
    @ApiModelProperty("picUrls")
    @TableField(value="pic_urls")
    private String picUrls;

    /**
     * @Fields star 评分， 1-5
     */
    @ApiModelProperty("star")
    @TableField(value="star")
    private Short star;

    /**
     * @Fields addTime 创建时间
     */
    @ApiModelProperty("addTime")
    @TableField(value="add_time")
    private ZonedDateTime addTime;

    /**
     * @Fields updateTime 更新时间
     */
    @ApiModelProperty("updateTime")
    @TableField(value="update_time")
    private ZonedDateTime updateTime;

    /**
     * @Fields deleted 逻辑删除
     */
    @ApiModelProperty("deleted")
    @TableField(value="deleted")
    private Boolean deleted;

    private static final long serialVersionUID = 1L;

    /** 
     * @return id 
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /** 
     * @return value_id 如果type=0，则是商品评论；如果是type=1，则是专题评论。
     */
    public Integer getValueId() {
        return valueId;
    }

    /**
     * @param valueId 如果type=0，则是商品评论；如果是type=1，则是专题评论。
     */
    public void setValueId(Integer valueId) {
        this.valueId = valueId;
    }

    /** 
     * @return type 评论类型，如果type=0，则是商品评论；如果是type=1，则是专题评论；
     */
    public Byte getType() {
        return type;
    }

    /**
     * @param type 评论类型，如果type=0，则是商品评论；如果是type=1，则是专题评论；
     */
    public void setType(Byte type) {
        this.type = type;
    }

    /** 
     * @return content 评论内容
     */
    public String getContent() {
        return content;
    }

    /**
     * @param content 评论内容
     */
    public void setContent(String content) {
        this.content = content == null ? null : content.trim();
    }

    /** 
     * @return admin_content 管理员回复内容
     */
    public String getAdminContent() {
        return adminContent;
    }

    /**
     * @param adminContent 管理员回复内容
     */
    public void setAdminContent(String adminContent) {
        this.adminContent = adminContent == null ? null : adminContent.trim();
    }

    /** 
     * @return user_id 用户表的用户ID
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * @param userId 用户表的用户ID
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /** 
     * @return has_picture 是否含有图片
     */
    public Boolean getHasPicture() {
        return hasPicture;
    }

    /**
     * @param hasPicture 是否含有图片
     */
    public void setHasPicture(Boolean hasPicture) {
        this.hasPicture = hasPicture;
    }

    /** 
     * @return pic_urls 图片地址列表，采用JSON数组格式
     */
    public String getPicUrls() {
        return picUrls;
    }

    /**
     * @param picUrls 图片地址列表，采用JSON数组格式
     */
    public void setPicUrls(String picUrls) {
        this.picUrls = picUrls == null ? null : picUrls.trim();
    }

    /** 
     * @return star 评分， 1-5
     */
    public Short getStar() {
        return star;
    }

    /**
     * @param star 评分， 1-5
     */
    public void setStar(Short star) {
        this.star = star;
    }

    /** 
     * @return add_time 创建时间
     */
    public ZonedDateTime getAddTime() {
        return addTime;
    }

    /**
     * @param addTime 创建时间
     */
    public void setAddTime(ZonedDateTime addTime) {
        this.addTime = addTime;
    }

    /** 
     * @return update_time 更新时间
     */
    public ZonedDateTime getUpdateTime() {
        return updateTime;
    }

    /**
     * @param updateTime 更新时间
     */
    public void setUpdateTime(ZonedDateTime updateTime) {
        this.updateTime = updateTime;
    }

    /** 
     * @return deleted 逻辑删除
     */
    public Boolean getDeleted() {
        return deleted;
    }

    /**
     * @param deleted 逻辑删除
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        LitemallComment other = (LitemallComment) that;
        return (this.getId() == null ? other.getId() == null :
				 this.getId().equals(other.getId()))
            && (this.getValueId() == null ? other.getValueId() == null :
				 this.getValueId().equals(other.getValueId()))
            && (this.getType() == null ? other.getType() == null :
				 this.getType().equals(other.getType()))
            && (this.getContent() == null ? other.getContent() == null :
				 this.getContent().equals(other.getContent()))
            && (this.getAdminContent() == null ? other.getAdminContent() == null :
				 this.getAdminContent().equals(other.getAdminContent()))
            && (this.getUserId() == null ? other.getUserId() == null :
				 this.getUserId().equals(other.getUserId()))
            && (this.getHasPicture() == null ? other.getHasPicture() == null :
				 this.getHasPicture().equals(other.getHasPicture()))
            && (this.getPicUrls() == null ? other.getPicUrls() == null :
				 this.getPicUrls().equals(other.getPicUrls()))
            && (this.getStar() == null ? other.getStar() == null :
				 this.getStar().equals(other.getStar()))
            && (this.getAddTime() == null ? other.getAddTime() == null :
				 this.getAddTime().equals(other.getAddTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null :
				 this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getDeleted() == null ? other.getDeleted() == null :
				 this.getDeleted().equals(other.getDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getValueId() == null) ? 0 : getValueId().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
        result = prime * result + ((getAdminContent() == null) ? 0 : getAdminContent().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getHasPicture() == null) ? 0 : getHasPicture().hashCode());
        result = prime * result + ((getPicUrls() == null) ? 0 : getPicUrls().hashCode());
        result = prime * result + ((getStar() == null) ? 0 : getStar().hashCode());
        result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        return result;
    }
}